package com.project.bean;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.time.LocalDate;

/**
 * 用户对象
 */
public class UserBean {
    /**编号*/
    private Integer id;
    /**用户名*/
    private String userName;
    /**密码*/
    private String pwd;
    /**生日*/
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate birthday;
    /**电话*/
    private String phone;
    /**工资*/
    private Integer money;

    public UserBean(String userName, String pwd, LocalDate birthday, String phone, Integer money) {
        this.userName = userName;
        this.pwd = pwd;
        this.birthday = birthday;
        this.phone = phone;
        this.money = money;
    }

    public UserBean() {
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPwd() {
        return pwd;
    }

    public void setPwd(String pwd) {
        this.pwd = pwd;
    }

    public LocalDate getBirthday() {
        return birthday;
    }

    public void setBirthday(LocalDate birthday) {
        this.birthday = birthday;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public Integer getMoney() {
        return money;
    }

    public void setMoney(Integer money) {
        this.money = money;
    }

    @Override
    public String toString() {
        return "UserBean{" +
                "id=" + id +
                ", userName='" + userName + '\'' +
                ", pwd='" + pwd + '\'' +
                ", birthday=" + birthday +
                ", phone='" + phone + '\'' +
                ", money=" + money +
                '}';
    }
}
